<%@page import="java.net.URLDecoder"%>
<%@page import="org.json.simple.parser.JSONParser"%>
<%@page import="org.json.simple.JSONArray"%>
<%@page import="org.json.simple.JSONObject"%>
<%@page import="code.CodeDTO"%>
<%@page import="code.CodeDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> </title>
</head>
<body>
<jsp:useBean id="dto" class="code.CodeDTO" />
<jsp:setProperty property="*" name="dto"/>
<%
CodeDAO dao = new CodeDAO();
dao.setDto(dto);

//grp2 자동 채번 ============ //
dto.setCd_grp2(dao.grp2());
//============================ //

// session값으로 등록자/수정자 세팅 ============ //
dto.setRg_pp((String)session.getAttribute("mid"));
dto.setMd_pp((String)session.getAttribute("mid"));
//============================================== //
int yn = dao.insert();
%>
</body>
</html>